<template>
  <div class="container">
    父组件 {{money}}
    <hr>
    <!-- <Son :money="money" @update:money="money=$event" /> -->
    <!-- vue2.0  :money.sync="money" -->
    <!-- vue3.0  v-model:money="money" -->
    <Son v-model:money="money" />
  </div>
</template>
<script>
import { ref } from 'vue'
import Son from './Son.vue'
export default {
  name: 'App',
  components: {Son},
  setup () {
    // 共有财产
    const money = ref(1000)
    return { money }
  }
}
</script>
<style scoped lang="less"></style>
